Skip to content

fix(capture_entropy): add missing back button for cancel path#113

Merged
odudex merged 1 commit into
odudex:masterfrom
subinita01:fix/capture-entropy-back-button
Jul 3, 2026
Merged

fix(capture_entropy): add missing back button for cancel path#113
odudex merged 1 commit into
odudex:masterfrom
subinita01:fix/capture-entropy-back-button

Conversation

@subinita01

Copy link
Copy Markdown
Contributor

Summary

  • capture_entropy_page_create() had no explicit cancel path — the only exits were tapping the camera frame or choosing "No" in the low-entropy dialog. A user who navigates here accidentally is stuck.
  • snapshot_page_create() in dev_tools/snapshot.c is structurally identical and already has a back button; this was a copy-paste omission.
  • Adds back_btn_cb (with closing guard, matching the low_entropy_prompt_cb pattern) and calls ui_create_back_button() in capture_entropy_page_create().
  • The caller (entropy_from_camera.c) already handles cancel correctly: return_from_capture_cb checks capture_entropy_has_result() and routes back to the word count menu if no entropy was captured — no caller changes needed.

Files changed

main/pages/capture_entropy.c — +1 include, +9 lines callback, +1 line button creation. No other files changed.

@odudex

odudex commented Jul 1, 2026

Copy link
Copy Markdown
Owner

It's a redundant path but it's more intuitive. I'm ok with it

@subinita01

Copy link
Copy Markdown
Contributor Author

@odudex please check

@subinita01 subinita01 marked this pull request as ready for review July 3, 2026 11:13
@odudex odudex merged commit ec27fc1 into odudex:master Jul 3, 2026
10 checks passed
@odudex

odudex commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants